home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS25.ADF / Dodge / Dodge.mod < prev    next >
Text File  |  1989-01-26  |  1KB  |  38 lines

  1. MODULE Dodge; (* For Benchmark Modula-2  BY Mike SCARY Scalora *)
  2.  
  3. (* Dodge 1.0                 Mike Scalora                 PLink : SCARY
  4.  
  5.  This MODULE is public domain.   Freely distributable as long as this 
  6.  notice stays in.
  7.  
  8.  This program was originally uploaded to PeopleLink's Amiga Zone.  The Amiga
  9.  Zone has well over 2700 members, and a library of thousands of public domain
  10.  files.  If you're interested in joining us, call 800-524-0100 (voice) 
  11.  or 800-826-8855 (modem).                                                  *)
  12.  
  13. FROM Preferences IMPORT Preferences, GetPrefs, SetPrefs;
  14. FROM AmigaDOS IMPORT DateStampRecord, DateStamp;
  15. FROM SYSTEM IMPORT ADR, ADDRESS, BYTE;
  16. FROM System IMPORT argc, argv;
  17.  
  18. VAR
  19.   MyP : Preferences;
  20.   DS : DateStampRecord;
  21.   MV : LONGINT;
  22.  
  23. BEGIN
  24.   MV := 5;
  25.   IF argc>=2 THEN
  26.     IF (argv^[1]^[0]='7') OR (argv^[1]^[0]='9') THEN
  27.       MV := LONGINT(ORD(argv^[1]^[0])-ORD('0')); END;
  28.   END;
  29.   IF GetPrefs(ADR(MyP),SIZE(MyP))=ADDRESS(0) THEN; END;
  30.   DateStamp(DS);
  31.   DS.dsTick := (DS.dsTick MOD (MV)) - (MV DIV 2D);
  32.   MyP.ViewXOffset := BYTE(LONGINT(MyP.ViewXOffset) + DS.dsTick);
  33.   DateStamp(DS);
  34.   DS.dsTick := (DS.dsTick MOD (MV)) - (MV DIV 2D);
  35.   MyP.ViewYOffset := BYTE(LONGINT(MyP.ViewYOffset) + DS.dsTick);
  36.   IF SetPrefs(ADR(MyP),SIZE(MyP),FALSE)=ADDRESS(0) THEN; END;
  37. END Dodge.
  38.